import 'package:amoy_ticket/utils/object_util.dart';
import 'package:amoy_ticket/utils/router/getRouteConfig.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:card_swiper/card_swiper.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';

class HomeTabBarOne extends StatefulWidget {
  HomeTabBarOne({Key? key}) : super(key: key);

  @override
  _HomeTabBarOneState createState() => _HomeTabBarOneState();
}

class _HomeTabBarOneState extends State<HomeTabBarOne> {
  @override
  void initState() {
    super.initState();
  }

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
    for (var i = 0; i < _imgList.length; i++) {
      precacheImage(CachedNetworkImageProvider(_imgList[i]), context);
    }
  }

  RefreshController _refreshController =
      RefreshController(initialRefresh: false);
  bool isHotFilm = true;
  bool isOnNext = true;

  String onSelectPerfectCommandsTabs = '0'; //默认第一个 超值精选、周末好去处、人气推荐
  //comingSoon 背景图 索引值

  int comingSoonIndex = 0;
  //轮播图--图片
  List _imgList = [
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_one.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_two.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_three.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_four.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_five.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_six.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_seven.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_eight.png',
    'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/swiper/swiper_nine.png',
  ];

  List _floatDataBgList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image1.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202112/1638878465689171917.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/339311704142.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image2.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202111/1637918986566102676.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/338288537682.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image3.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202110/1634107565903116917.jpg',
      'movieUrl':
          'https://bizcommon.alicdn.com/KM596pxVraOsnEmgAP7/253p108jV0dvYXpeaUl__hd.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image4.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202112/1639215102812805449.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/340704226867.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image5.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202112/1638360965578456198.jpg',
      'movieUrl':
          'https://bizcommon.alicdn.com/KM596pxVraOsnEmgAP7/P2PydagXlEYo6DnxaUQ__hd.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image6.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202112/1638360965578456198.jpg',
      'movieUrl':
          'https://bizcommon.alicdn.com/KM596pxVraOsnEmgAP7/P2PydagXlEYo6DnxaUQ__hd.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image7.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202111/1637037319204868960.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/336309364355.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image8.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202111/1637049665504748319.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/336790383422.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image9.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202111/163602006672338848.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/328663797441.mp4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image10.jpg',
      "movieCoverUrl":
          'http://taobaodianying.alicdn.com/img/202111/1637129765652981927.jpg',
      'movieUrl':
          'https://cloud.video.taobao.com/play/u/1745440806/p/1/d/hd/e/6/t/1/337483491681.mp4',
    },
  ];

  List comingSoonList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image1.jpg',
      'serialNumber': '1',
      'filmGrade': '3D IMAX',
      'number': '38.7',
      'title': '007:无暇赴死',
      'status': '想看',
      'date': '10月29日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image2.jpg',
      'serialNumber': '2',
      'number': '24.0',
      'title': '沙丘',
      'status': '预售',
      'date': '10月22日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image3.jpg',
      'serialNumber': '3',
      'number': '10.5',
      'title': '第一炉香',
      'status': '预售',
      'date': '10月22日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image4.jpg',
      'serialNumber': '4',
      'number': '10.3',
      'title': '入殓师',
      'status': '预售',
      'date': '10月29日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image5.jpg',
      'serialNumber': '5',
      'number': '8.1',
      'title': '梅艳芳',
      'status': '想看',
      'date': '11月12日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image6.jpg',
      'serialNumber': '6',
      'number': '7.6',
      'title': '铁道英雄',
      'status': '想看',
      'date': '11月19日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image7.jpg',
      'serialNumber': '7',
      'number': '4.1',
      'title': '门锁',
      'status': '想看',
      'date': '11月19日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image8.jpg',
      'serialNumber': '8',
      'number': '5.2',
      'title': '穿过寒冬拥抱你',
      'status': '想看',
      'date': '12月24日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image9.jpg',
      'serialNumber': '9',
      'number': '4.5',
      'title': '极盗行动',
      'status': '预售',
      'date': '10月22日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image10.jpg',
      'filmGrade': '3D 中国巨幕',
      'serialNumber': '10',
      'number': '3.4',
      'title': '我的初恋十八岁',
      'status': '想看',
      'date': '11月11日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image11.jpg',
      'serialNumber': '11',
      'number': '3.1',
      'title': '乌海',
      'status': '想看',
      'date': '10月29日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image12.jpg',
      'filmGrade': '2D IMAX',
      'serialNumber': '12',
      'number': '3.0',
      'title': '扬名立万',
      'status': '想看',
      'date': '11月11日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image13.jpg',
      'serialNumber': '13',
      'number': '13.9',
      'title': '天书奇谈4K纪念版',
      'status': '想看',
      'date': '11月5日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image14.jpg',
      'serialNumber': '14',
      'number': '2.4',
      'title': '不速来客',
      'status': '购票',
      'date': '10月22日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image15.jpg',
      'serialNumber': '15',
      'number': '1.6',
      'title': '反贪风暴5:最终章',
      'status': '想看',
      'date': '12月31日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image16.jpg',
      'serialNumber': '16',
      'number': '5.6',
      'title': '平原上的火焰',
      'status': '想看',
      'date': '12月24日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image17.jpg',
      'filmGrade': '2D IMAX',
      'serialNumber': '17',
      'number': '1.5',
      'title': '忠犬八公',
      'status': '想看',
      'date': '12月31日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image18.jpg',
      'serialNumber': '18',
      'number': '1.3',
      'title': '爱情神话',
      'status': '想看',
      'date': '12月24日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image19.jpg',
      'serialNumber': '19',
      'number': '1.1',
      'title': '野马分鬃',
      'status': '想看',
      'date': '11月26日',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image20.jpg',
      'serialNumber': '20',
      'number': '1.0',
      'title': '李茂换太子',
      'status': '想看',
      'date': '12月31日',
    },
  ];

  List _perfectCommandsList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image1.png',
      'title': '辽宁芭蕾舞团《八女投江》',
      'type': '舞蹈芭蕾',
      'discount': '7.8',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image2.png',
      'title': '开心麻花《飞谎腾达》',
      'type': '音乐会',
      'discount': '7.5',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image3.png',
      'title': '“乐见古典”——吴纯、刘宇与江苏交响乐团演奏贝多芬',
      'type': '话剧歌剧',
      'discount': '5.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image4.png',
      'title': '“一生所爱”浪漫爱情经典名曲圣诞节专场音乐会',
      'type': '音乐会',
      'discount': '7.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image5.png',
      'title': '东野圭吾舞台剧《圣女的救济》',
      'type': '话剧歌剧',
      'discount': '7.8',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image6.png',
      'title': '[市民音乐会]《我心永恒》',
      'type': '音乐会',
      'discount': '7.8',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image7.png',
      'title': '[合作]日本圆谷正版·奥特曼系列舞台秀《奥特英雄银河格斗》',
      'type': '儿童亲子',
      'discount': '7.0',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image8.png',
      'title': '开心麻花爆笑舞台剧《贼想得到你》-常州站',
      'type': '话剧歌剧',
      'discount': '8.0',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image9.png',
      'title': '第八届安徽文惠项目 杨丽萍舞蹈剧场《十面埋伏》',
      'type': '舞蹈芭蕾',
      'discount': '7.4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/perfect_commands/perfect_commands_image11.png',
      'title': '张信哲世界巡回演唱会 南京站',
      'type': '演唱会',
      'discount': '8.0',
    },
  ];

  List _hotPreviousList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image1.jpg',
      'introduce': '《第一炉香》曝终极预告10月22日全国献映',
      'name': '第一炉香',
      'numberWantSee': '10.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image2.jpg',
      'introduce': '《沙丘》主创特辑 张震分享IMAX特制拍摄独家幕后细节',
      'name': '沙丘',
      'numberWantSee': '22.4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image3.jpg',
      'introduce': '《007:无暇赴死》“全新特工”特辑 聚焦强大女性力量',
      'name': '007:无暇赴死',
      'numberWantSee': '42.2',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image4.jpg',
      'introduce': '《梅艳芳》特辑揭秘筹备7年 王丹妮穿婚纱试戏引全场落泪',
      'name': '梅艳芳',
      'numberWantSee': '8.2',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image5.jpg',
      'introduce': '《门锁》预告 独居女性的不安来自身边',
      'name': '门锁',
      'numberWantSee': '4.2',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image6.jpg',
      'introduce': '《入殓师》曝定档预告 10月2日',
      'name': '入殓师',
      'numberWantSee': '10.1',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image7.jpg',
      'introduce': '《乌海》杨子姗特辑 对吵黄轩“虐”哭导演周子扬',
      'name': '乌海',
      'numberWantSee': '5.4',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image8.jpg',
      'introduce': '《极盗行动》曝“三十六计”终极预告 阿根廷票房冠军来袭',
      'name': '极盗行动',
      'numberWantSee': '1.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image9.jpg',
      'introduce': '《图兰朵:魔咒缘起》首发预告 全阵容亮相',
      'name': '图兰朵:魔咒缘起',
      'score': '7.5',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/hot_previous/image10.jpg',
      'introduce': '《兰心大剧院》娄烨导演特辑 巩俐素颜出镜还原演员本色',
      'name': '兰心大剧院',
      'score': '7.7',
    },
  ];

  List _weekendImageList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image1.png',
      'title': '梁晓声原著改变 明星版',
      'type': '话剧歌剧',
      'discount': '9.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image2.png',
      'title': '解忧の江湖 南京馆',
      'type': '展览休闲',
      'discount': '9.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image3.png',
      'title': '亲子动漫视听音乐会《寻梦环游记》',
      'type': '话剧歌剧',
      'discount': '9.5',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image4.png',
      'title': '非常戏剧《大话东游》北纬零度出品',
      'type': '话剧歌剧',
      'discount': '9.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image5.png',
      'title': '锡剧电影《珍珠塔》',
      'type': '话剧歌剧',
      'discount': '9.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image6.png',
      'title': '南京恋爱博物馆',
      'type': '展览休闲',
      'discount': '',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image7.png',
      'title': 'BOY STORY-南京欢乐谷蓝鲸音乐节',
      'type': '演唱会',
      'discount': '9.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image8.png',
      'title': '2021宫崎骏动漫作品试听',
      'type': '音乐会',
      'discount': '',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image9.png',
      'title': '海龟先生-欢乐谷蓝鲸音乐节',
      'type': '演唱会',
      'discount': '',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/weekends/image10.png',
      'title': '重喜剧 《你若安好，那还得了》北纬零度出品',
      'type': '话剧歌剧',
      'discount': '9.7',
    },
  ];

  List _recommendationList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image1.png',
      'title': '许嵩、郭顶——南京森林音乐节',
      'type': '演唱会',
      'discount': '8.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image2.png',
      'title': '舞蹈诗剧《只此青绿》南京站',
      'type': '舞蹈芭蕾',
      'discount': '9.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image3.png',
      'title': '梁晓声原著改变 明星版',
      'type': '话剧歌剧',
      'discount': '9.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image4.png',
      'title': '张韶涵世界巡回演唱会 南京站',
      'type': '演唱会',
      'discount': '8.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image5.png',
      'title': '爱乐之城“LA LA LAND”唯美浪漫经典名曲试听音乐会',
      'type': '音乐会',
      'discount': '9.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image6.png',
      'title': '辽宁芭蕾舞团《八女投江》',
      'type': '舞蹈芭蕾',
      'discount': '6.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image7.png',
      'title': '解忧の江湖 南京馆',
      'type': '展览休闲',
      'discount': '',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image8.png',
      'title': '启蒙交响乐《放屁大象吹低音号》',
      'type': '音乐会',
      'discount': '',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image9.png',
      'title': '星空魔幻城&幻觉艺术馆&国风汉服体验馆',
      'type': '展览休闲',
      'discount': '',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/recommendation/image10.png',
      'title': '阿加莎名剧《谋杀启事》2021 中文版 南京站',
      'type': '话剧歌剧',
      'discount': '',
    },
  ];

  List _floatDataList = [
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon/coming_soon_image1.jpg',
      'filmGrade': '2D IMAX',
      'title': '长津湖',
      'status': '购票',
      'discount': '9.5',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image2.jpg',
      'filmGrade': '2D IMAX',
      'title': '我和我的父辈',
      'status': '购票',
      'discount': '9.5',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image3.jpg',
      'filmGrade': '2D IMAX',
      'title': '兰心大剧院',
      'status': '购票',
      'discount': '7.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image4.jpg',
      'filmGrade': '3D IMAX',
      'title': '沙丘',
      'status': '预售',
      'numberWantSee': '21.9',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image5.jpg',
      'filmGrade': '2D 中国巨幕',
      'title': '第一炉香',
      'status': '预售',
      'numberWantSee': '10.6',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image6.jpg',
      'filmGrade': '3D',
      'title': '白蛇2:图兰朵·魔咒缘起',
      'status': '购票',
      'discount': '7.5',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image7.jpg',
      'filmGrade': '2D 中国巨幕',
      'title': '不速来客',
      'status': '购票',
      'discount': '9.3',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image8.jpg',
      'filmGrade': '3D 中国巨幕',
      'title': '峰爆',
      'status': '购票',
      'discount': '9.1',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image9.jpg',
      'filmGrade': '2D IMAX',
      'title': '极盗行动',
      'status': '预售',
      'numberWantSee': '1.7',
    },
    {
      'imageUrl':
          'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/float_image/float_image10.jpg',
      'title': '五个扑水的少年',
      'status': '购票',
      'discount': '9.1',
    },
  ];

  @override
  Widget build(BuildContext context) {
    return SmartRefresher(
      controller: _refreshController,
      enableTwoLevel: true,
      enablePullDown: true,
      enablePullUp: true,
      onLoading: () async {
        await Future.delayed(Duration(milliseconds: 2000));
        // _refreshController.loadComplete();
        _refreshController.loadNoData();
      },
      onRefresh: () async {
        await Future.delayed(Duration(milliseconds: 2000));
        _refreshController.refreshCompleted();
      },
      onTwoLevel: (bool isOpen) {
        print("twoLevel opening:" + isOpen.toString());
        if (isOpen) {
          _refreshController.twoLevelComplete();
          Get.toNamed(RouteConfig.webviewPage, arguments: {
            'title': '致我的陌生恋人',
            'url':
                'https://t.taopiaopiao.com/yep/page/m/zwdmslr?shared-by-app=other',
            'isRoot': 'false',
          });
        }
      },
      header: TwoLevelHeader(
        textStyle: TextStyle(color: Colors.white),
        displayAlignment: TwoLevelDisplayAlignment.fromTop,
        decoration: BoxDecoration(
          image: DecorationImage(
              image: CachedNetworkImageProvider(
                  'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image10.jpg'),
              fit: BoxFit.cover,
              // 很重要的属性,这会影响你打开二楼和关闭二楼的动画效果
              alignment: Alignment.topCenter),
        ),
        twoLevelWidget: _twoLevelWidget(),
      ),
      child: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              padding: EdgeInsets.only(bottom: 12.h, left: 12.w, right: 12.w),
              width: double.infinity,
              height: 100.h,
              child: Swiper(
                itemBuilder: (BuildContext context, int index) {
                  //每次循环遍历时，将i赋值给index
                  return CachedNetworkImage(
                    imageUrl: _imgList[index],
                    fit: BoxFit.fill,
                    // color: Colors.white,
                  );
                },
                // containerHeight: 200,
                autoplayDelay: 3000,
                itemCount: _imgList.length,
                pagination: new SwiperPagination(), //设置：分页器.
                loop: true,
                autoplay: true,
                control: new SwiperControl(color: Colors.black), //设置：左右的箭头
              ),
              decoration: BoxDecoration(color: Colors.white),
            ),
            // Image.network(
            //   'http://qyu5iz9il.hd-bkt.clouddn.com/home_swiper_bottom.png',
            //   fit: BoxFit.fill,
            // ),
            SizedBox(height: 8.h),
            _customTabBar('热映影片', '最新预告', 'isHotFilm', '123'),
            SizedBox(height: 8.h),
            isHotFilm
                ? _hotMovie()
                : Container(
                    height: 230,
                    margin: EdgeInsets.only(left: 15),
                    child: ListView.builder(
                      physics: BouncingScrollPhysics(),
                      shrinkWrap: true,
                      scrollDirection: Axis.horizontal,
                      itemCount: _hotPreviousList.length,
                      itemBuilder: (context, index) {
                        return _hotPreviousItem(
                          _hotPreviousList[index]['imageUrl'],
                          introduce: _hotPreviousList[index]['introduce'],
                          title: _hotPreviousList[index]['name'],
                          score: _hotPreviousList[index]['score'],
                          numberWantSee: _hotPreviousList[index]
                              ['numberWantSee'],
                        );
                      },
                    ),
                  ),
            SizedBox(height: 16.h),
            _customTabBar('即将上映', '新片想看榜', 'isOnNext', '111'),
            SizedBox(height: 8.h),
            Container(
              margin: EdgeInsets.only(left: 13.w),
              height: 190.h,
              child: ListView.builder(
                physics: BouncingScrollPhysics(),
                shrinkWrap: true,
                scrollDirection: Axis.horizontal,
                itemCount: isOnNext ? (comingSoonList.length + 1) : 11,
                itemBuilder: (context, index) {
                  return isOnNext
                      ? (index < (comingSoonList.length)
                          ? _preSaleImage(
                              comingSoonList[index]['imageUrl'],
                              comingSoonList[index]['title'],
                              comingSoonList[index]['status'],
                              index,
                              filmGrade:
                                  comingSoonList[index]['filmGrade'] ?? '',
                              date: comingSoonList[index]['date'],
                              number: comingSoonList[index]['number'],
                            )
                          : _endWidget(comingSoonList.length.toString()))
                      : (index < 10
                          ? _preSaleImage(
                              comingSoonList[index]['imageUrl'],
                              comingSoonList[index]['title'],
                              comingSoonList[index]['status'],
                              index,
                              date: comingSoonList[index]['date'],
                              serialNumber: comingSoonList[index]
                                  ['serialNumber'],
                              number: comingSoonList[index]['number'],
                            )
                          : _endWidget(11.toString()));
                },
              ),
            ),
            SizedBox(height: 13.h),
            _perfectCommands(),
          ],
        ),
      ),
    );
  }

  Widget _hotMovie() {
    return Stack(
      children: [
        Column(
          children: [
            GestureDetector(
              onTap: () {
                var _map = {
                  'movieCoverUrl': _floatDataBgList[comingSoonIndex]
                      ['movieCoverUrl'],
                  'movieUrl': _floatDataBgList[comingSoonIndex]['movieUrl'],
                };
                Get.toNamed(RouteConfig.videoFullScreenPage, arguments: _map);
              },
              child: Container(
                child: Center(
                  child: Icon(
                    Icons.play_arrow,
                    size: 60,
                    color: Colors.white,
                  ),
                ),
                height: 210,
                width: double.infinity,
                decoration: BoxDecoration(
                    image: DecorationImage(
                  image: CachedNetworkImageProvider(
                    _floatDataBgList[comingSoonIndex]['imageUrl'],
                  ),
                  fit: BoxFit.fill,
                )),
              ),
            ),
            SizedBox(height: 150),
          ],
        ),
        Positioned(
          bottom: 0,
          left: 15,
          child: Row(
            children: [
              Container(
                height: 180.h,
                width: MediaQuery.of(context).size.width - 20.w,
                child: ListView.builder(
                  shrinkWrap: true,
                  scrollDirection: Axis.horizontal,
                  itemCount: _floatDataList.length + 1,
                  itemBuilder: (context, index) {
                    return index < (_floatDataList.length)
                        ? _preSaleImage(
                            _floatDataList[index]['imageUrl'],
                            _floatDataList[index]['title'],
                            _floatDataList[index]['status'],
                            index,
                            filmGrade: _floatDataList[index]['filmGrade'] ?? '',
                            number:
                                _floatDataList[index]['numberWantSee'] ?? '',
                            score: _floatDataList[index]['discount'] ?? '',
                            isFloat: true,
                          )
                        : _endWidget(_floatDataList.length.toString());
                  },
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }

  Widget _hotPreviousItem(String imageUrl,
      {String? introduce,
      String? title,
      String? score,
      String? numberWantSee}) {
    return Container(
      margin: EdgeInsets.only(right: 5),
      width: 265,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            height: 150,
            decoration: BoxDecoration(
                image: DecorationImage(
                  image: CachedNetworkImageProvider(imageUrl),
                  fit: BoxFit.fill,
                ),
                borderRadius: BorderRadius.circular(7)),
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Container(
                margin: EdgeInsets.only(left: 5, top: 10),
                width: 190,
                child: Column(
                  children: [
                    Text(
                      introduce ?? '',
                      overflow: TextOverflow.ellipsis,
                      maxLines: 1,
                      style: TextStyle(
                          fontSize: 14,
                          fontWeight: FontWeight.bold,
                          color: Color(0xFF373a44)),
                    ),
                    Row(
                      children: [
                        Image.asset(
                          'assets/images/movie_icon.png',
                          height: 15,
                          width: 15,
                          color: Color(0xFF9ea1ab),
                        ),
                        Text(
                          title ?? '',
                          overflow: TextOverflow.ellipsis,
                          maxLines: 1,
                          style:
                              TextStyle(color: Color(0xFF9ea1ab), fontSize: 12),
                        ),
                        Expanded(
                            child: Row(
                          children: [
                            Container(
                              margin: EdgeInsets.symmetric(horizontal: 5),
                              width: 1,
                              height: 10,
                              decoration:
                                  BoxDecoration(color: Color(0xFF9ea1ab)),
                            ),
                            ObjectUtil.isNotEmpty(score)
                                ? Row(
                                    children: [
                                      Text(
                                        score ?? '123',
                                        style: TextStyle(
                                            fontSize: 15,
                                            fontWeight: FontWeight.bold,
                                            color: Color(0xFFf0963e)),
                                      ),
                                      Text(
                                        '分',
                                        style: TextStyle(
                                            fontSize: 13,
                                            color: Color(0xFFf0963e)),
                                      ),
                                    ],
                                  )
                                : Text(
                                    numberWantSee!.contains('.')
                                        ? '$numberWantSee万人想看'
                                        : '$numberWantSee人想看',
                                    style: TextStyle(
                                        color: Color(0xFF9ea1ab), fontSize: 12),
                                  )
                          ],
                        ))
                      ],
                    )
                  ],
                ),
              ),
              Container(
                margin: EdgeInsets.only(right: 10),
                padding: EdgeInsets.symmetric(horizontal: 13, vertical: 3),
                child: Text(
                  '想看',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 15,
                  ),
                ),
                decoration: BoxDecoration(
                    color: Color(0xFFf0a247),
                    borderRadius: BorderRadius.circular(15)),
              ),
            ],
          )
        ],
      ),
    );
  }

  Widget _perfectCommands() {
    return Container(
      margin: EdgeInsets.only(left: 15),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text(
                '精彩演出',
                style: TextStyle(fontSize: 15.sp, fontWeight: FontWeight.bold),
              ),
              Row(
                children: [
                  Text('演出日历'),
                  Icon(Icons.chevron_right, size: 13.sp),
                  SizedBox(width: 13.h),
                ],
              ),
            ],
          ),
          SizedBox(height: 5.h),
          _perfectCommandsTabs('超值精选', '周末好去处', '人气推荐'),
          SizedBox(height: 5.h),
          Container(
            height: 200.h,
            child: ListView.builder(
              scrollDirection: Axis.horizontal,
              itemCount: _perfectCommandsList.length,
              itemBuilder: (context, index) {
                return onSelectPerfectCommandsTabs == '0'
                    ? _perfectCommandsWidget(
                        _perfectCommandsList[index]['imageUrl'],
                        _perfectCommandsList[index]['title'],
                        _perfectCommandsList[index]['type'],
                        _perfectCommandsList[index]['discount'])
                    : (onSelectPerfectCommandsTabs == '1'
                        ? _perfectCommandsWidget(
                            _weekendImageList[index]['imageUrl'],
                            _weekendImageList[index]['title'],
                            _weekendImageList[index]['type'],
                            _weekendImageList[index]['discount'])
                        : _perfectCommandsWidget(
                            _recommendationList[index]['imageUrl'],
                            _recommendationList[index]['title'],
                            _recommendationList[index]['type'],
                            _recommendationList[index]['discount']));
              },
            ),
          ),
          // _perfectCommandsWidget(),
        ],
      ),
    );
  }

  Widget _endWidget(String sum) {
    if (ObjectUtil.isEmpty(sum)) {
      sum = '0';
    }
    return Column(
      children: [
        Container(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text(
                '查看全部',
                style: TextStyle(color: Colors.white),
              ),
              Divider(
                color: Colors.white,
                indent: 20,
                endIndent: 20,
                thickness: 1,
              ),
              Text(
                '$sum部',
                style: TextStyle(color: Colors.white),
              ),
            ],
          ),
          width: 73.w,
          height: 100.h,
          decoration: BoxDecoration(
            color: Color(0xFF626263),
            borderRadius: BorderRadius.circular(10),
          ),
        ),
        SizedBox(width: 10),
      ],
    );
  }

  Widget _perfectCommandsWidget(
      String imageUrl, String title, String type, String discount) {
    return Row(
      children: [
        Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(
              width: 73.w,
              height: 93.w,
              child: Stack(
                children: [
                  Visibility(
                      visible: ObjectUtil.isNotEmpty(discount),
                      child: Positioned(
                          left: 0,
                          bottom: 0,
                          child: Container(
                            padding: EdgeInsets.symmetric(
                                horizontal: 5.w, vertical: 2.h),
                            decoration: BoxDecoration(
                                color: Colors.orange,
                                borderRadius: BorderRadius.only(
                                  topRight: Radius.circular(5.r),
                                  bottomRight: Radius.circular(5.r),
                                  bottomLeft: Radius.circular(5.r),
                                )),
                            child: Text(
                              '$discount折',
                              style: TextStyle(
                                  color: Colors.white, fontSize: 11.sp),
                            ),
                          )))
                ],
              ),
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(8.r),
                  image: DecorationImage(
                      image: CachedNetworkImageProvider(imageUrl),
                      fit: BoxFit.fill)),
            ),
            SizedBox(height: 5.w),
            Container(
              width: 75.w,
              child: Text(
                title,
                maxLines: 2,
                overflow: TextOverflow.ellipsis,
                style: TextStyle(color: Colors.black, fontSize: 13.sp),
              ),
            ),
            SizedBox(height: 5.h),
            Container(
              padding: EdgeInsets.symmetric(horizontal: 2.w),
              child: Text(
                type,
                style: TextStyle(fontSize: 11.sp),
              ),
              decoration: BoxDecoration(
                border: Border.all(color: Colors.grey),
              ),
            )
          ],
        ),
        SizedBox(width: 10.w),
      ],
    );
  }

  Widget _customTabBar(
      String text1, String text2, String stausName, String amount) {
    bool select = false;
    if (stausName == 'isHotFilm') {
      select = isHotFilm;
    } else if (stausName == 'isOnNext') {
      select = isOnNext;
    }
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Row(
          children: [
            SizedBox(width: 13.w),
            GestureDetector(
              child: Text(
                text1,
                style: TextStyle(
                    color: select ? Colors.black : Color(0xFF606571),
                    fontSize: select ? 15.sp : 14.sp,
                    fontWeight: select ? FontWeight.bold : FontWeight.normal),
              ),
              onTap: () {
                if (stausName == 'isHotFilm') {
                  isHotFilm = true;
                } else if (stausName == 'isOnNext') {
                  isOnNext = true;
                }

                setState(() {});
              },
            ),
            SizedBox(width: 8.w),
            GestureDetector(
              child: Text(
                text2,
                style: TextStyle(
                    color: select ? Color(0xFF606571) : Colors.black,
                    fontSize: select ? 14.sp : 15.sp,
                    fontWeight: select ? FontWeight.normal : FontWeight.bold),
              ),
              onTap: () {
                if (stausName == 'isHotFilm') {
                  isHotFilm = false;
                } else if (stausName == 'isOnNext') {
                  isOnNext = false;
                }
                setState(() {});
              },
            )
          ],
        ),
        GestureDetector(
          child: Row(
            children: [
              Text('全部$amount'),
              Icon(Icons.chevron_right, size: 12.sp),
              SizedBox(width: 12.w),
            ],
          ),
        ),
      ],
    );
  }

  Widget _perfectCommandsTabs(String text1, String text2, String text3) {
    return Row(
      children: [
        GestureDetector(
          child: Text(
            text1,
            style: TextStyle(
                color: onSelectPerfectCommandsTabs == '0'
                    ? Colors.black
                    : Color(0xFF606571),
                fontSize: onSelectPerfectCommandsTabs == '0' ? 13.sp : 12.sp,
                fontWeight: onSelectPerfectCommandsTabs == '0'
                    ? FontWeight.bold
                    : FontWeight.normal),
          ),
          onTap: () {
            onSelectPerfectCommandsTabs = '0';
            setState(() {});
          },
        ),
        SizedBox(width: 10),
        GestureDetector(
          child: Text(
            text2,
            style: TextStyle(
                color: onSelectPerfectCommandsTabs == '1'
                    ? Colors.black
                    : Color(0xFF606571),
                fontSize: onSelectPerfectCommandsTabs == '1' ? 13.sp : 12.sp,
                fontWeight: onSelectPerfectCommandsTabs == '1'
                    ? FontWeight.bold
                    : FontWeight.normal),
          ),
          onTap: () {
            onSelectPerfectCommandsTabs = '1';
            setState(() {});
          },
        ),
        SizedBox(width: 10),
        GestureDetector(
          child: Text(
            text3,
            style: TextStyle(
                color: onSelectPerfectCommandsTabs == '2'
                    ? Colors.black
                    : Color(0xFF606571),
                fontSize: onSelectPerfectCommandsTabs == '2' ? 13.sp : 12.sp,
                fontWeight: onSelectPerfectCommandsTabs == '2'
                    ? FontWeight.bold
                    : FontWeight.normal),
          ),
          onTap: () {
            onSelectPerfectCommandsTabs = '2';
            setState(() {});
          },
        )
      ],
    );
  }

  Widget _preSaleImage(
    String imageUrl,
    String title,
    String status,
    int index, {
    String filmGrade = '',
    String date = '',
    String serialNumber = '',
    bool isHotMovie = false,
    String score = '',
    String number = '',
    bool isFloat = false,
  }) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        GestureDetector(
          onTap: () {
            if (isFloat) {
              comingSoonIndex = index;
              setState(() {});
            }
          },
          child: Container(
            child: Stack(
              children: [
                ObjectUtil.isNotEmpty(filmGrade)
                    ? Positioned(
                        child: Container(
                          padding: EdgeInsets.symmetric(
                              horizontal: 5.h, vertical: 2.h),
                          decoration: BoxDecoration(
                              color: Colors.black,
                              borderRadius: BorderRadius.circular(5.r)),
                          child: Text(
                            filmGrade,
                            style: TextStyle(
                                color: Colors.white,
                                fontWeight: FontWeight.bold,
                                fontSize: 12.sp),
                          ),
                        ),
                        left: 2.w,
                        top: 5.h,
                      )
                    : Container(),
                ObjectUtil.isNotEmpty(serialNumber)
                    ? Positioned(
                        left: 0,
                        top: 0,
                        child: Container(
                          width: 22.w,
                          height: 24.h,
                          child: Center(
                              child: Text(
                            serialNumber,
                            style:
                                TextStyle(color: Colors.white, fontSize: 13.sp),
                          )),
                          decoration: BoxDecoration(
                            color: serialNumber == '1'
                                ? Color(0xFFe9618d)
                                : (serialNumber == '2'
                                    ? Color(0xFFf1a645)
                                    : (serialNumber == '3'
                                        ? Color(0xFFf5c343)
                                        : (Color(0xFFaeb3c1)))),
                            borderRadius: BorderRadius.only(
                              bottomRight: Radius.circular(5.r),
                            ),
                          ),
                        ),
                      )
                    : Container(),
                Positioned(
                  child: ObjectUtil.isNotEmpty(number)
                      ? Row(
                          children: [
                            Text(
                              number,
                              style: TextStyle(
                                  color: Colors.white,
                                  // fontWeight: FontWeight.bold,
                                  fontSize: 14.sp),
                            ),
                            Text(
                              number.contains('.') ? '万人想看' : '人想看',
                              style: TextStyle(
                                  color: Colors.white,
                                  // fontWeight: FontWeight.bold,
                                  fontSize: 11.sp),
                            )
                          ],
                        )
                      : (ObjectUtil.isNotEmpty(score)
                          ? Row(
                              children: [
                                Text(
                                  score,
                                  style: TextStyle(
                                      fontSize: 13.sp,
                                      fontWeight: FontWeight.bold,
                                      color: Colors.white),
                                ),
                                Text(
                                  '分',
                                  style: TextStyle(
                                      fontSize: 11.sp, color: Colors.white),
                                ),
                              ],
                            )
                          : Container()),
                  left: 2.w,
                  bottom: 5.h,
                ),
              ],
            ),
            width: 73.w,
            height: 100.h,
            decoration: BoxDecoration(
                border:
                    isHotMovie ? Border.all(color: Colors.red) : Border.all(),
                borderRadius: BorderRadius.circular(8),
                image: DecorationImage(
                    image: CachedNetworkImageProvider(imageUrl),
                    fit: BoxFit.fill)),
          ),
        ),
        SizedBox(height: 5.h),
        Container(
          width: 80.w,
          child: Text(
            title,
            maxLines: 1,
            overflow: TextOverflow.ellipsis,
            style: TextStyle(
                color: Colors.black,
                fontSize: 12.sp,
                fontWeight: FontWeight.bold),
          ),
        ),
        SizedBox(height: 5.h),
        ObjectUtil.isNotEmpty(date)
            ? Text(
                '$date上映',
                style: TextStyle(
                  color: Color(0xFF989ca6),
                  fontSize: 10.sp,
                ),
              )
            : Container(),
        SizedBox(height: 5.h),
        GestureDetector(
          child: Container(
            padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 4.h),
            child: Text(
              status,
              style: TextStyle(color: Colors.white, fontSize: 12.sp),
            ),
            decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(20.r),
                color: status == '预售'
                    ? Color(0xFF5caff3)
                    : (status == '购票' ? Color(0xFFea6280) : Color(0xFFf1a247))),
          ),
        ),
      ],
    );
  }

  _twoLevelWidget() {
    return Container(
      // height: 200,
      padding: EdgeInsets.only(top: 300),
      decoration: BoxDecoration(
        color: Color(0xFF62683a),
        image: DecorationImage(
          image: CachedNetworkImageProvider(
              "https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image10.jpg"),
          // 很重要的属性,这会影响你打开二楼和关闭二楼的动画效果,关联到TwoLevelHeader,如果背景一致的情况,请设置相同
          alignment: Alignment.topCenter,
          fit: BoxFit.contain,
        ),
      ),
      // child: Image.network(
      //   'https://amoy-ticket.oss-cn-nanjing.aliyuncs.com/images/coming_soon_bg/image10.jpg',
      //   fit: BoxFit.fill,
      // ),
    );
  }
}
